home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-09-29 | 10.4 KB | 209 lines | [TEXT/R*ch] |
- TCXdiff 1.0b1
- =============
-
- [ TCXdiff requires System 7.x. ]
- [ TCXdiff is © Tat C. Wan, 1993. ]
- [ Portions © Symantec. Xdiff code modified from NCSA's sources. ]
- [ This program is freeware. ]
-
- This file is best viewed using a monospaced font (like Monaco or Courier).
-
- 1) What is it?
-
- TCXdiff is a text file comparison utility which generates a difference (diff)
- file for a given source file. The diff file can be used to update an older
- version of the source file stored on another computer (normally, a Unix
- machine). By transferring the much shorter diff file instead of the entire
- source file, significant upload time can be saved. This is especially useful
- for people who connect to Unix hosts using slow dial-up modems. Although the
- primary focus of TCXdiff is for programmers who need to synchronize their
- program files between their personal computer and a Unix host, it can be used
- to update any other text file as well.
-
- TCXdiff is based on the freeware program Xdiff written in August 1989 at the
- National Center for Supercomputing Applications (NCSA). You can obtain Xdiff
- via anonymous ftp from ftp.ncsa.uiuc.edu. The Xdiff package is needed in
- addition to TCXdiff since TCXdiff DOES NOT perform the updating per se, but
- relies on xfix (part of the Xdiff package) to perform that task. Xfix was
- written primarily for Unix hosts, I have not tried to compile it on other
- platforms.
-
- TCXdiff is functionally equivalent to Xdiff. However, it adds the ability to
- specify default folders and filenames (useful for batch processing), as well
- as drag-and-drop file processing capabilities.
-
- 2) How does it work?
-
- In order to maintain and update text files stored on Unix machines with edited
- versions created on a Macintosh, the following steps are needed:
-
- First, a control file is created, which is typically the first version of the
- file. This control file MUST exist on both the Macintosh and the Unix host.
- Then, as changes are made to the text file (called the source file), these
- changes can be tracked and uploaded to the Unix host by means of difference
- (diff) files that is generated by TCXdiff. The xfix program then takes the diff
- file and the control file (residing on the Unix host) and creates an up-to-date
- version of the source file (let's call it the source* file).
-
- This can be illustrated in the following diagram:
-
- >> [source file] [control file]
- >> | |
- >> +---------+----------+
- >> |
- Macintosh >> v
- >> > TCXdiff <
- >> |
- >> v
- >> [diff file]
- |
- | (transmission: modem,
- / serial link, etc.)
- +-------/
- >> | [control file] (must be identical
- >> | | to control file
- >> +---------+---------+ on Mac)
- >> |
- Unix >> v
- host >> > xfix <
- >> |
- >> v
- >> [source* file] (updated version of source
- >> file)
-
- The control and diff files usually have the same name as the source file, with
- the addition of a prefix. Let the source file be "mySource.p". The control file
- will have a default prefix of "c." (i.e. "c.mySource.p"), which is what xfix
- expects. Diff files can have any prefix, I'm using "X." as the default (i.e.
- "X.mySource.p"). I have included the ability to specify different prefixes for
- the control and diff files. What I do typically is to have all my source files
- in its own folder (e.g. mySource Folder) and the control files in another
- folder (e.g. myControl Folder). When a sufficient number of revisions to the
- source file have been made, I generate the latest diff file, upload it to the
- Unix host, and generate the updated source file. Then, I update the control
- file on the Macintosh by replacing it with the latest version in mySource
- Folder (by means of the "Make/Update Control File" command in TCXdiff), as well
- as update the control file on the Unix host by copying the updated version of
- the source file over the existing control file (you'll have to do this step
- yourself, sorry). In this way, the size of the diff file does not continually
- increase with each revision.
-
- If the version of the control file on the Unix host is different from the one
- on the Mac, xfix will complain about a checksum error and will not generate
- the updated source file (it generates an EMPTY updated source file). If that
- happens, you should upload the new source file and update the respective
- control files on the Unix host and the Mac for future use instead.
-
- 3) Commands in TCXdiff
-
- Almost all commands in TCXdiff can be accessed via the Settings dialog as well
- as through menu items. Here's a brief explanation of what they mean:
-
- File Menu:
- TCXdiff Settings... Opens the TCXdiff Settings dialog to start
- processing
- Close Close the TCXdiff Settings dialog
- Save Prefs Save the current preferences (if changed)
- Always Save Prefs Does not prompt user to save changed prefs
- (automatically save any changed prefs)
- Always Overwrite Cntl File Does not prompt user if control file should be
- overwritten (automatically overwrite)
- Quit Exactly what it means
-
- Edit Menu:
- (Not used in TCXdiff)
-
- Xdiff Menu:
- Source File... Specify the source file
- Control File... Specify the control file
- Diff file... Specify the diff file
- Make/Update Cntl File Make control file for specified source file if it
- is not specified or does not exist, otherwise
- update control file
- Generate Diff File Generate the diff file
-
- Xdiff Settings:
- Use Default Cntl File Search for control files in the default control
- folder, using the control prefix and source
- filename as the name of the control file
- Use Default Diff File Store diff files in default diff folder
- Set Cntl Prefix... Specify the control prefix for locating default
- control filenames
- Set Diff Prefix... Specify the diff prefix for generating default
- diff filenames
- Set Default Cntl Folder... Specify the default folder for locating control
- files
- Set Default Diff Folder... Specify the default folder for locating diff
- files
-
- You can only make control files if the source file has been specified. If the
- "Use Default Cntl File" checkbox is checked, then the control filename and
- folder is generated automatically. If the "Always Overwrite Cntl File" menu
- item is checked, then you are not prompted if the control file should be
- overwritten when you make or update the Control file. You cannot overwrite
- the source file that is currently active.
-
- The diff file is always overwritten automatically (unless it happens to be
- either the source or control file, in which case the command will abort).
- It is therefore suggested to always define a file prefix for diff files,
- so as not to overwrite other files accidentally.
-
- You can only process a source file (i.e. generate the diff file) if all three
- types of files have been specified. You can also process a source file via
- drag-and-drop. If either the control file or diff files were not specified as
- "Use Default" or if the control file was not found, you will be prompted to
- locate the relevant files. It is recommended that "Use Default" be checked
- (after the respective parameters have been set up correctly, of course) to
- automate the drag-and-drop generation of diff files.
-
- The status windows will indicate the pathname of the file if it has been
- specified correctly (either automatically or manually via the "Source File",
- "Control File" or "Diff File" buttons/menu items).
-
- Tidbit: I've included a TMPL resource in the application, which allows you
- to edit some of the default preferences in TCXdiff's PREF resource (generated
- if a valid preference file was not found). This assumes that you know how to
- use Resedit, and do work on a copy of the program, etc.
-
- 4) Acknowledgements
-
- This is my first attempt at releasing a Macintosh program :0). Since I have
- limited access to different machines, this was only tested on a IIsi running
- System 7.01•. I wrote TCXdiff in order to learn how to use the Think Class
- Library better, as well as take care of some of the shortcomings of Xdiff.
- Besides, Xdiff was not compatible with ApplWindows, a really nice freeware
- process manager. I decided that I liked ApplWindows too much to give it up, so
- TCXdiff was born.
-
- Thanks to Jon Wätte for his Mac Programming FAQ, Jamie McCarthy for the
- CPrefsFile code, Andrew Gilmartin for the TCL archive, and the folks on the
- Internet for their valuable help. I'd like to dedicate this modest effort to
- all those people who'd written some great freeware/shareware programs for the
- Macintosh.
-
- 5) Legalese
-
- TCXdiff is free, but it is not in the public domain. I do not make any
- warrantees as to its useability, nor